typedef enum _Tag {
    TS_ADD,
    TS_SUB,
    TS_MUL,
    TS_DIV,
    TS_LPAR,
    TS_RPAR,
    TS_NUM,
    TS_REAL,
    TS_EOF
} Tag;

class Token {
public:
    Tag tag;
    Token(Tag t) {tag = t;}
};

class Num : public Token {
public:
    int value;
    Num(int v) : Token(TS_NUM) {value = v;}
};

class Real : public Token {
public:
    double value;
    Real(double v) : Token(TS_REAL) { value = v;}
};
